package com.fkdx.webman.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class SelectResult<T> {

    private Integer total;
    private Map<String, Object> pagination;

    private List<T> results;

    public SelectResult(List<T> results) {
        this.results = results;
    }
    public SelectResult(Integer total, List<T> results) {
        this.total = total;
        this.results = results;
    }
    public SelectResult(Map<String, Object> pagination, List<T> results) {
        this.pagination = pagination;
        this.results = results;
    }

}
